<include file="Public:header"/>
<div class="col-sm-12 widget-container-span">
	<div class="widget-box transparent">
		<div class="widget-body">
			<div class="widget-main padding-12 no-padding-left no-padding-right">
				<div class="tab-content padding-4">
					<div id="home1" class="tab-pane in active">
						<div class="row">
							<div class="col-xs-12 no-padding-right">
								<div class="table-responsive">
									<table id="sample-table-1"
										class="table table-striped table-bordered table-hover">
										<thead>
											<tr>
												<!-- <th class="center"><label> <input
														type="checkbox" class="ace"> <span class="lbl"></span>
												</label></th> -->
												<th>订单编号</th>
												<th>联系人|联系方式|地址</th>
												<th>价格</th>
												<th>支付方式</th>
												<th>支付状态</th>
												<th>订单状态</th>
												<th>创建时间</th>
												<th>详情</th>
												<th>操作</th>
											</tr>
										</thead>

										<tbody>
										<volist name="result" id="result">
											<tr>
												<!-- <td class="center"><label> <input
														type="checkbox" class="ace"> <span class="lbl"></span>
												</label></td> -->
												
												<td>{$result.orderid}</td>
												<td>{$result.user.username}|{$result.user.phone}<br/>{$result.user.address}</td>
												<td>{$result.totalprice}</td>
												<td>{$result.pay_style}</td>
												<td>
													<eq name = "result.pay_status" value="1">
													<span class="label label-info">已付款</span>			
													<else/>
													<span class="label label-default">未付款</span>
													</eq>
												</td>
												<td>
													<eq name = "result.order_status" value="1">
													<span class="label label-info">已发货</span>	
													<else/>
													<span class="label label-default">未发货</span>
													</eq>			
												</td>
												<td>{$result.time}</td>
												<td style="width:65px;">
													<div class="btn-group" style="position: absolute;">
														<a class="btn btn-white btn-sm"
															data-toggle="dropdown">
															详情 <i class="fa fa-angle-down"></i>
														</a>
														<ul class="dropdown-menu" role="menu">
															<li><a>
																	<table style="text-align: center;">
																		<tr>订单商品详情：</tr>
																		<tr>
																			<td>商品名称|</td>
																			<td>商品价格|</td>
																			<td>商品数量</td>
																		</tr>
																		<php>
																		$json = $result[cartdata];
																		$data = json_decode($json,true);
																		for($i=0;$i < count($data);$i++){
																			 echo '<tr><td>'.$data[$i][name].'</td><td>'.$data[$i][price].'</td><td>'.$data[$i][num].'</td></tr>';
																		}
																		</php>
																	</table>
															</a></li>
														</ul>
													</div>
												</td>

												<td><a href="{:U('Admin/Order/publish',array('id'=>$result['id']))}" class="btn btn-white btn-sm">现在发货</a><a href="{:U('Admin/Order/payComplete',array('id'=>$result['id']))}" class="btn btn-white btn-sm">已支付</a><a class="btn btn-white btn-sm" href="{:U('Admin/Order/del',array('id'=>$result['id']))}">删除</a></td>
											</tr>
										</volist>
										</tbody>
									</table>
									<div class="pagination" style="margin:0px;">
									    {$page}
									</div>
								</div>
							</div>
						</div>
					</div>
					
					<div id="home2" class="tab-pane in">
						<form class="form-horizontal J_ajaxForm" id="myform" action="{:U('Admin/Menu/addmenu')}" method="post">
							<div class="tabbable">
								<div class="tab-content">
									<div class="tab-pane active">
										<table cellpadding="2" cellspacing="2" width="100%">
											<tbody>
												<tr>
													<td width="140">上级:</td>
													<td>
														<select name="parent" class="normal_select">
															<option value="0">作为一级分类</option>
															<volist name="menulist" id="menulist">
																<option value="{$menulist.id}">{$menulist.name}</option>
															</volist>
														</select>
													</td>
												</tr>
												<tr>
													<td>名称:</td>
													<td><input type="text" class="input" name="name"
														value=""><input type="hidden" name="addmenu" value="0"></td>
												</tr>
											</tbody>
										</table>
									</div>
								</div>
							</div>
							<div class="form-actions">
								<button class="btn btn-primary btn_submit J_ajax_submit_btn"
									type="submit">提交</button>
								<a class="btn" href="">返回</a>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>